using Microsoft.AspNetCore.Builder;

namespace RAG.Api.Middleware
{
    public static class MiddlewareExtensions
    {
        /// <summary>
        /// 注册用户活动中间件
        /// </summary>
        public static IApplicationBuilder UseUserActivity(this IApplicationBuilder app)
        {
            return app.UseMiddleware<UserActivityMiddleware>();
        }

        /// <summary>
        /// 注册权限验证中间件
        /// </summary>
        public static IApplicationBuilder UsePermissionAuthorization(this IApplicationBuilder app)
        {
            return app.UseMiddleware<PermissionAuthorizationMiddleware>();
        }
    }
}
